package cn.itsource.easyexcel.write;

import cn.itsource.constant.Constant;
import cn.itsource.util.GenerateUserUtil;
import cn.itsource.vo.User5;
import com.alibaba.excel.EasyExcel;

import static cn.itsource.util.GenerateUserUtil.getUserData;


/**
 * 根据数据转换器写入excel
 */
public class WriteDemo13 {
    public static void main(String[] args) {
        String filename =  Constant.BATH_URL + "user14.xlsx";

        // 向Excel中写入数据
        EasyExcel.write(filename, User5.class)
                .sheet("用户信息")
                .doWrite(GenerateUserUtil.getUser5Data());
    }
}
